import java.util.Scanner;

public class treemonksUp {
    public static void main(String[] args){
        System.out.println("请输入第一名和尚的身高");
        Scanner monk1 = new Scanner(System.in);//第一个和尚的身高
        int monktall1 = monk1.nextInt();
        System.out.println("恭喜你设置成功，第一名和尚的身高为:" + monktall1);
        System.out.println("请输入第二名和尚的身高");
        Scanner monk2 = new Scanner(System.in);
        int monktall2 = monk2.nextInt();
        System.out.println("恭喜你设置成功，第二名和尚的身高为:" + monktall2);
        System.out.println("请输入第三名和尚的身高");
        Scanner monk3 = new Scanner(System.in);
        int monktall3 = monk3.nextInt();
        System.out.println("恭喜你设置成功，第三名和尚的身高为:"+ monktall3);
        int monktall1andmonktall2top = monktall1 > monktall2 ? monktall1 : monktall2;
        int monktalltop = monktall1andmonktall2top > monktall3 ? monktall1andmonktall2top : monktall3;

        System.out.println("根据比较最高的和尚身高为:" + monktalltop);

    }
}
